home *** CD-ROM | disk | FTP | other *** search
/ The Arsenal Files 8 / The Arsenal Files Collection #8 (Arsenal Computer) (1996).ISO / pcboard / iemsi120.zip / 7&8-BIT.PPE (.txt) < prev    next >
PCBoard Programming Language Executable  |  1996-10-12  |  3KB  |  190 lines

  1.     Function FUNCTION000
  2.  
  3. ;------------------------------------------------------------------------------
  4. ;                                                   .ss.
  5. ;                                                   `²²'
  6. ;             .,sS$Ss,,s$  .,sS$$$Ss.  .,sS$Ss,,s$ .ss.  .sSs.
  7. ;           .d$$²^°²$$$$'.d$P²°^^²$P'.d$$²^°²$$$$'.$$$' .$$$²Sb,.
  8. ;           $$$'   .$$$' $$$²Sçsµ²' .$$$'   .$$$'.$$$' .$$$'  `$$b.
  9. ;           $$$b,,d$$$' ,$$$b,....,s$$$$b,,d$$$'.$$$;.,$$$'    ;$$$
  10. ;           `²S$$S²²S$$S²°²S$$$$S²°°²S$$$$$$',$$S²°²S$S'.sS$$$P²'
  11. ;                                    .sS²°$$$²²°"'       d²°'
  12. ;                                  .$$²  .$$'
  13. ;                                  $$$.,d$$'
  14. ;                                  `²S$$S²'
  15. ;------------------------------------------------------------------------------
  16. ; P.P.L.X. 2.OO                          (C)1996 - Lone Runner / AEGiS CoRP'96 
  17. ;------------------------------------------------------------------------------
  18. ; PPE 3.2O (Encryption type I) - Analysis ON - Postprocessing ON
  19. ;------------------------------------------------------------------------------
  20.  
  21.     String   STRING002
  22.     String   STRING006
  23.     String   STRING007
  24.     String   STRING008
  25.     String   STRING009
  26.     String   STRING010
  27.     String   STRING011
  28.     String   STRING012
  29.     Byte     BYTE001
  30.     Word     WORD002
  31.     Word     WORD003
  32.     Declare  Function FUNCTION001(String STRING001) String
  33.     Declare  Function FUNCTION002(String STRING005) String
  34.  
  35. ;------------------------------------------------------------------------------
  36.  
  37.     Goto LABEL001
  38.     End
  39.  
  40. ;------------------------------------------------------------------------------
  41.  
  42.     Function FUNCTION001(String STRING001) String
  43.  
  44.     Word     WORD001
  45.     String   STRING003
  46.     String   STRING004
  47.     Function FUNCTION002
  48.  
  49.     For WORD001 = 1 To Len(STRING001)
  50.         STRING003 = Mid(STRING001, WORD001, 1)
  51.         If (Asc(STRING003) > 126) Then
  52.             STRING004 = STRING004 + "\" + I2S(Asc(STRING003), 16)
  53.             Continue
  54.         Endif
  55.         STRING004 = STRING004 + STRING003
  56.         If (InStr("\{[]}", STRING003) <> 0) STRING004 = STRING004 + STRING003
  57.     Next
  58.     FUNCTION001 = STRING004
  59.  
  60.     EndFunc
  61.  
  62.  
  63. ;------------------------------------------------------------------------------
  64.  
  65.     Function FUNCTION002(String STRING005) String
  66.  
  67.     Word     WORD002
  68.     Word     WORD003
  69.     String   STRING007
  70.     String   STRING008
  71.     String   STRING009
  72.     String   STRING010
  73.  
  74.     For WORD002 = 1 To Len(STRING005)
  75.         STRING009 = Right(STRING005, Len(STRING005) - WORD002 + 1)
  76.         WORD003 = InStr(STRING009 + "\", "\")
  77.         STRING008 = STRING008 + Left(STRING009, WORD003 - 1)
  78.         WORD002 = WORD002 + WORD003 - 1
  79.         If (Mid(STRING005, WORD002 + 1, 1) == "\") Then
  80.             STRING007 = "\"
  81.             Inc WORD002
  82.         Else
  83.             STRING007 = Chr(S2I(Mid(STRING005, WORD002 + 1, 2), 16))
  84.             WORD002 = WORD002 + 2
  85.         Endif
  86.         STRING008 = STRING008 + STRING007
  87.     Next
  88.     STRING008 = ReplaceStr(STRING008, "{{", "{")
  89.     STRING008 = ReplaceStr(STRING008, "}}", "}")
  90.     STRING008 = ReplaceStr(STRING008, "[[", "[")
  91.     STRING008 = ReplaceStr(STRING008, "]]", "]")
  92.     FUNCTION002 = STRING008
  93.  
  94.     EndFunc
  95.  
  96.     :LABEL001
  97.     For BYTE001 = 127 To 254
  98.         STRING012 = STRING012 + Chr(BYTE001)
  99.     Next
  100.     STRING012 = Mask_Ascii() + STRING012
  101.     STRING010 = "▓▒░ Sample 8-Bit string ░▒▓"
  102.     While (STRING011 <> "Q") Do
  103.         Cls
  104.         PrintLn "EMSI/IEMSI 7-Bit and 8-Bit translation"
  105.         PrintLn "--------------------------------------"
  106.         Newline
  107.         PrintLn "String = """, STRING010, """"
  108.         Newline
  109.         PrintLn "1.  Enter new string"
  110.         PrintLn "2.  Convert to 7-Bit"
  111.         PrintLn "3.  Convert to 8-Bit"
  112.         Newline
  113.         InputStr "(Q=Quit) Selection", STRING011, 7, 1, Mask_Ascii(), 32 + 8
  114.         If (STRING011 == 1) Then
  115.             InputStr "String", STRING010, 7, 200, STRING012, 4096
  116.             Continue
  117.         Endif
  118.         If (STRING011 == 2) Then
  119.             Print "Working ..."
  120.             STRING010 = FUNCTION001(STRING010)
  121.             Continue
  122.         Endif
  123.         If (STRING011 == 3) Then
  124.             Print "Working ..."
  125.             STRING010 = FUNCTION002(STRING010)
  126.         Endif
  127.     EndWhile
  128.     End
  129.  
  130. ;------------------------------------------------------------------------------
  131. ;
  132. ; Usage report (before postprocessing)
  133. ;
  134. ; ■ Statements used :
  135. ;
  136. ;    2       End
  137. ;    1       Cls
  138. ;    18      Goto 
  139. ;    29      Let 
  140. ;    2       Print 
  141. ;    6       PrintLn 
  142. ;    10      If 
  143. ;    2       InputStr 
  144. ;    1       Inc 
  145. ;    3       Newline
  146. ;    2       EndFunc
  147. ;
  148. ;
  149. ; ■ Functions used :
  150. ;
  151. ;    18      +
  152. ;    3       -
  153. ;    4       ==
  154. ;    2       <>
  155. ;    3       <
  156. ;    3       <=
  157. ;    1       >
  158. ;    6       >=
  159. ;    9       !
  160. ;    6       &&
  161. ;    3       ||
  162. ;    5       Len(
  163. ;    3       Mid()
  164. ;    1       Left()
  165. ;    1       Right()
  166. ;    2       Chr()
  167. ;    2       Asc()
  168. ;    2       InStr()
  169. ;    2       Mask_Ascii()
  170. ;    1       I2S()
  171. ;    1       S2I()
  172. ;    4       ReplaceStr()
  173. ;
  174. ;------------------------------------------------------------------------------
  175. ;
  176. ; Analysis flags : No flag
  177. ;
  178. ;------------------------------------------------------------------------------
  179. ;
  180. ; Postprocessing report
  181. ;
  182. ;    3       For/Next
  183. ;    1       While/EndWhile
  184. ;    5       If/Then or If/Then/Else
  185. ;    0       Select Case
  186. ;
  187. ;------------------------------------------------------------------------------
  188. ;                 AEGiS Corp - Break the routines, code against the machines!
  189. ;------------------------------------------------------------------------------
  190.